

function addformprice()
{

   
    $("#firstaddform").append('<div id="feature'+rowdiv+'" class="itPlg featureclass">'+dataform['price']+"</div>");
    var rownow=rowdiv;

    
    
    
    
    
    rowdiv++;

}
function isNumber(n) {
   return (typeof n==='number');
}
function saveformprice(id,plugid)
{
var obj={};
var price,saleprice;
if($("#"+id+' input[name="price[]"]').val()||$("#"+id+' input[name="saleprice[]"]').val())
{
price=parseFloat($("#"+id+' input[name="price[]"]').val());
saleprice=parseFloat($("#"+id+' input[name="saleprice[]"]').val());

}

if(price=="NaN")
{

price="";
}

if(saleprice=="NaN")
{

saleprice="";
}

  obj={plugid:plugid,price:price,saleprice:saleprice,curid:$("#"+id+' select[name="curid[]"]').val()};

    return obj;



}
function getformprice(dataplugin)
{
if(dataplugin.price!="0.00")
{


if(dataplugin['price']&&dataplugin['saleprice']!='0.00')
{
$('.ovlPopLd '+targetdiv+' .ldIt.wrpOutPrcLd .wrpPrcLd span.prcLd:eq(1)').show();
$('.ovlPopLd '+targetdiv+' .ldIt.wrpOutPrcLd .wrpPrcLd span.prcLd:eq(0)').addClass('rgPrc');
$('.ovlPopLd '+targetdiv+' .ldIt.wrpOutPrcLd .wrpPrcLd span.prcLd:eq(0)').html((dataplugin.price)+' '+dataplugin.currencyname  );
$('.ovlPopLd '+targetdiv+' .ldIt.wrpOutPrcLd .wrpPrcLd span.prcLd:eq(1)').html((dataplugin.saleprice)+' '+dataplugin.currencyname);

}else
{
$('.ovlPopLd '+targetdiv+' .ldIt.wrpOutPrcLd .wrpPrcLd span.prcLd:eq(1)').hide();
$('.ovlPopLd '+targetdiv+' .ldIt.wrpOutPrcLd .wrpPrcLd span.prcLd:eq(0)').removeClass('rgPrc');

$('.ovlPopLd '+targetdiv+' .ldIt.wrpOutPrcLd .wrpPrcLd span.prcLd:eq(0)').html((dataplugin.price)+' '+dataplugin.currencyname  );


}


$('.ovlPopLd '+targetdiv+' .ldIt.wrpOutPrcLd').show();
}else
{
$('.ovlPopLd '+targetdiv+' .ldIt.wrpOutPrcLd').hide();

}
var str="";
return str;

}
function editformprice(datarow)
{
              addformprice();
              var rownow= rowdiv-1;
              if(datarow.price!='0.00')$('#feature'+rownow+' input[name="price[]"]').val(datarow.price);
              if(datarow.saleprice!='0.00')$('#feature'+rownow+' input[name="saleprice[]"]').val(datarow.saleprice);
              
              $('#feature'+rownow+' select[name="curid[]"]').val(datarow.curid);

}